#include <stdio.h>
#include <windows.h>
#include "rpc_pipes_h.h"

void PrintMsg(const char *pszMsg)
// void PrintMsg(IN RPC_BINDING_HANDLE hBinding, const unsigned char *pszMsg)
{
	printf_s("%s\n", pszMsg);
}

void Shutdown()
{
	RPC_STATUS status;

	printf_s("Calling RpcMgmtStopServerListening\n");
	status = RpcMgmtStopServerListening(NULL);
	printf_s("RpcMgmtStopServerListening returned: 0x%x\n", status);
	if (status) {
		exit(status);
	}

	printf_s("Calling RpcServerUnregisterIf\n");
	status = RpcServerUnregisterIf(NULL, NULL, FALSE);
	printf_s("RpcServerUnregisterIf returned 0x%x\n", status);
	if (status) {
		exit(status);
	}
}